package com.teach.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import com.teach.R;
import com.teach.dto.PhotoFormDTO;
import com.teach.entity.Album;
import com.teach.service.PhotoService;

/**<pre>
 * 
 * 创建时间 ：	2019年12月4日 上午11:32:58
 * 当前版本：	V1.0
 * Copyright © 1998 - 2019 jlzhou.top. All Rights Reserved	
 * </pre>
 * @author J.L.Zhou
 *
 */
@RestController
@RequestMapping("/photo")
public class PhotoController {

	@Autowired
	private PhotoService service;
	
	@PostMapping("upload.do")
	public R doUpload(PhotoFormDTO form,MultipartFile img){
		service.upload(form, img);
		return R.ok();
	}
}
